<?php
 /**
 +------------------------------------------------------------------------------
 * 所有控制器的父类
 +------------------------------------------------------------------------------
 * @Version  2.2
 * @Author   WangXian
 * @E-mail    admin@loopx.cn
 * @package  ephp
 * @FileName  controller.class.php
 * @Creation  date 2010-10-17
 * @Modified  date 2010-10-17
 +------------------------------------------------------------------------------
 */

class controller
{
	public $view; #view视图操作语柄
	public function __construct()
	{
		$this->view = new View();
	}
	/**
	 * 渲染模板视图,通display()
	 * @param string $file 默认"控制器/ACTION.tpl.php"
	 */
	public function render($file='')
	{
		$this->view->render($file);
	}
	
	/**
	 * 渲染模板视图,通render()
	 * @param string $file 默认"控制器/ACTION.tpl.php"
	 */
	public function display($file='')
	{
		$this->view->render($file);
	}
	
	/**
     * 模板变量赋值
     * @param string $name 模板名称
     * @param mixed $value array || string || object
     */
    public function assign($name,$value='')
    {
    	 $this->view->assign($name,$value);
    }
	
}


/* End of file controller.class.php */
/* Location: controller.class.php */